Skip to content

[rush-bridge-cache] Support read or write of cache#5268

Merged
dmichon-msft merged 2 commits intomicrosoft:mainfrom
dmichon-msft:bridge-cache-both
Jul 2, 2025
Merged

[rush-bridge-cache] Support read or write of cache#5268
dmichon-msft merged 2 commits intomicrosoft:mainfrom
dmichon-msft:bridge-cache-both

Conversation

@dmichon-msft
Copy link
Contributor

Summary

Updates @rushstack/rush-bridge-cache-plugin to use a choice parameter instead of a flag parameter, which options of "read" or "write.

  • "write" matches the prior behavior of the plugin, i.e. writes build cache entries from all existing outputs of selected operations
  • "read" is a best-effort replay-from-build-cache for all selected operations. Failures will display warnings but the exit code will still be 0.

Details

The existing options schema was malformed, so this technically should not be a breaking change.

Also exposes the configured Rush parallelism on the phased operation context object, so that it can be used by plugins.

How it was tested

Locally wired it into the repository and ran various permutations of rush build --bridge-cache-action=read and rush build --bridge-cache-action=write for different operation scopes.

Impacted documentation

The plugin's documentation.

@dmichon-msft dmichon-msft enabled auto-merge (squash) July 2, 2025 01:03
@dmichon-msft dmichon-msft merged commit 3c5a9f8 into microsoft:main Jul 2, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Bug Triage Jul 2, 2025
@dmichon-msft dmichon-msft deleted the bridge-cache-both branch July 2, 2025 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants